import {
	HTTP
} from "../request/request.js"

class COURSE extends HTTP {
	getCourseById(id) {
		return this.request({
			url: `/course/api/course/${id}`,
			method: 'GET'
		})
	}

	// 通过课程id查询章节列表数据
	getChapterSectionList(id) {
		return this.request({
			url: `/course/api/chapter/section/list/${id}`,
			method: 'GET'
		})
	}

	// 通过课程id查询评论列表数据
	getCourseCommentList(id) {
		return this.request({
			url: `/course/api/comment/list/${id}`,
			method: 'GET'
		})
	}

	// 通过课程id查询套餐搭配数据
	getCourseGroupList(id) {
		return this.request({
			url: `/course/api/group/list/${id}`,
			method: 'GET'
		})
	}
	getCourseIsBuy(courseId) {
		return request({
			url: `/course/course/is-buy/${courseId}`,
			method: 'GET'
		})
	}

}
export {
	COURSE
}
